package com.tjetc.service;

import com.tjetc.dao.FeedbacDao;
import com.tjetc.domain.Player;
import com.tjetc.utils.Db;
import org.apache.commons.dbutils.QueryRunner;

import java.util.List;

public class FeedbackService {
    private FeedbacDao feedbacDao =new FeedbacDao();


    public boolean add(int playerId, int fanId, String description) {
        try {
            QueryRunner queryRunner =new QueryRunner();
            //
            Db.start();
            feedbacDao.add(playerId,fanId,description);
            Db.commit();
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            Db.rollback();
        } finally {
            Db.close();
        }
        return false;
    }
}
